$SAPPHIRE/config/Sapphire.cfg
. This file contains all of the options that can be defined in Sapphire/Web. The values in this file will be used by all users of the tool until they save their user options or change specific options in a project. There is no way to directly modify this file from Sapphire/Web. You must either edit the file using a text editor like vi
or use the options editor in Sapphire/Web to define the options. Save these options to your home directory and then copy your user options file to $SAPPHIRE/config/Sapphire.cfg
.$HOME/Sapphire.cfg
. This file can be generated by pressing the Save Options button in the Edit pulldown menu in the Sapphire/Web Project Window. Once you save your user options, you will use these options for all of your new projects. If you want to revert back to options specified in the Global Options file, you must remove this file from your home directory.When Sapphire/Web needs to figure out the value of an option, it first looks to see if the option is defined for the project. If the option is not defined for the project, it then looks in the user file, and then the global file.
If the option Project.Allow Config File is set to True, Sapphire/Web will create a configuration file in your project directory that has the current value of all of the configurable options as its contents. It is up to you to copy it to the location specified in the Project.Config File Name option. Here is an example configuration file:
HTML URL : http://cezanne/~bnaugle/tut3 HTML Path : cezanne:~bnaugle/public_html/tut3 GIF URL : http://cezanne/~bnaugle/tut3 Database Name : Database Server : Database Vendor : NODEFAULT Database User Name : sapphire Database User Password : the passwd Project.HTML Startup Document : index.html Project.Print Form Args : True Project.Print Environment : False ORB_HOST : ORB_SEED :The syntax of the configuration file is
Name : Value
Not all options can be placed into a configuration file. The example configuration file above shows all of the possible options that are allowed in a configuration file.You may have noticed that some of the options in this configuration file do not have a Category in front of the name. These options can be found in both the Release and Test categories. Sapphire/Web does not write Release and Test in front of the option names so you can use the same configuration file in either Test or Release mode. The values put in the config file depend on how you generated your project. The Release options will be used when in Release mode; the Test options will be used when in Test mode.
When the Server Application executes and has been defined to allow a config file, it will request that file from the local http server. If the configuration file cannot be found on the local server, Sapphire will not generate an error; it will just use the hard-coded values. If the configuration file is found, all option values in the configuration file will override the hard-coded values in the Server Application.
Configuration files allow you to build a Server Application for use on several different machines. You can build and test the Server Application on one machine. After you verify that the application works, you can copy the Server Application and the HTML files needed by the Server Application to another machine. You then modify the configuration file to reflect the new machine, database and path information, and the application will now work on the new machine.
To modify a configuration file:
/~user/file.cfg